#ifndef  __WAVEWORKLAYER_H__
#define  __WAVEWORKLAYER_H__

#ifdef   WAVEWORKLAYER_GLOBALS
#define  WAVEWORKLAYER_EXT
#else
#define  WAVEWORKLAYER_EXT  extern
#endif

typedef enum
{
    ENUM_Waveform_Sta_None,
    ENUM_Waveform_Sta_Init,
    ENUM_Waveform_Sta_LessThanDataBuff,//小于缓冲数组DataBuff_ST
    ENUM_Waveform_Sta_GreThanDataBuff,//大于等于缓冲数组DataBuff_ST
}ENUM_Waveform_Sta;

/* 波形频率 */
#define BUILDPRESSURE_VOLTDATARATE    10
#define LOWFREPROTE_VOLTDATARATE      20
#define VOLATILITY_VOLTDATARATE       20
#define EXTEXCITATION_VOLTDATARATE    1
// #define EXTEXCITATION_VOLTDATARATE    10
// #define STARTSTOP_VOLTDATARATE        10
#define STARTSTOP_VOLTDATARATE        10
#define LOADUNLOAD_VOLTDATARATE       40
#define TUNING_VOLTDATARATE           20

WAVEWORKLAYER_EXT float  TemMax_GenFreqAverage;
WAVEWORKLAYER_EXT float  TemMax_ExcitationVolt;
WAVEWORKLAYER_EXT float  TemMax_ExcitationCurr;
WAVEWORKLAYER_EXT float  TemMax_GenPhaseVoltL1;
WAVEWORKLAYER_EXT float  TemMax_GenPhaseVoltL2;
WAVEWORKLAYER_EXT float  TemMax_GenPhaseVoltL3;
WAVEWORKLAYER_EXT float  TemMax_GenPhaseVoltAverage;
WAVEWORKLAYER_EXT float  TemMin_GenFreqAverage;
WAVEWORKLAYER_EXT float  TemMin_GenPhaseVoltL1;
WAVEWORKLAYER_EXT float  TemMin_GenPhaseVoltL2;
WAVEWORKLAYER_EXT float  TemMin_GenPhaseVoltL3;
WAVEWORKLAYER_EXT float  TemMin_GenPhaseVoltAverage;
WAVEWORKLAYER_EXT double TemSUM_GenPhaseVoltL1;
WAVEWORKLAYER_EXT double TemSUM_GenPhaseVoltL2;
WAVEWORKLAYER_EXT double TemSUM_GenPhaseVoltL3;
WAVEWORKLAYER_EXT double TemSUM_GenPhaseVoltAverage;
WAVEWORKLAYER_EXT double TemSUM_GenFreqAverage;
WAVEWORKLAYER_EXT double TemSUM_ExcitationVolt;
WAVEWORKLAYER_EXT double TemSUM_ExcitationCurr;
WAVEWORKLAYER_EXT double TemSUM_ExcitationPower;
WAVEWORKLAYER_EXT double TemSUM_GenPowerP1;
WAVEWORKLAYER_EXT double TemSUM_GenPowerP2;
WAVEWORKLAYER_EXT double TemSUM_GenPowerP3;
WAVEWORKLAYER_EXT double TemSUM_GenPowerQ1;
WAVEWORKLAYER_EXT double TemSUM_GenPowerQ2;
WAVEWORKLAYER_EXT double TemSUM_GenPowerQ3;
WAVEWORKLAYER_EXT double TemSUM_GenPFL1;
WAVEWORKLAYER_EXT double TemSUM_GenPFL2;
WAVEWORKLAYER_EXT double TemSUM_GenPFL3;
WAVEWORKLAYER_EXT double TemCount;
WAVEWORKLAYER_EXT uint32_t TimerCount;//计数器
WAVEWORKLAYER_EXT uint16_t DataRateIndex;//速率index
WAVEWORKLAYER_EXT float32_t share_DataBuffAddr_Sum;//写入SRAM地址累加

extern CurveDataBuff_ST share_CurveDataBuff_1;           // 曲线临时缓冲区1
extern CurveDataBuff_ST share_CurveDataBuff_2;           // 曲线临时缓冲区2
extern CurveDataBuff_ST share_CurveDataBuff_3;           // 曲线临时缓冲区3
extern CurveDataBuff_ST share_CurveDataBuff_4;           // 曲线临时缓冲区4
extern CurveDataBuff_ST share_CurveDataBuff_5;           // 曲线临时缓冲区5

void WaveSetFlowDataStatus(uint8_t TempWorkflow);
uint8_t WaveRequestWorkLayerHandle(uint8_t TempWorkflow, uint8_t *ActInform);
#endif
